#include <iostream>
#include <string>
#include <cmath>
const double pi = 3.14;

using namespace std;

class yuan
{
private:
    int r; //半径
    int x; //横坐标
    int y; //纵坐标
public:
    void set_data()
    {
        cout << "请按顺序输入半径, 横坐标 ,纵坐标" << endl;
        cin >> r >> x >> y;
    }

public: 
     //周长
    float yuan_C()
    {
        float C;
        C = 2 * pi * r;
        return C; 
    }
    //面积
    float yuan_S()
    {
        float S;
        S  = pi * r * r;
        return S;
    }
    //直径
    float yuan_D()
    {
        float D;
        D = 2 * r ;
        return D;
    }
    int yuan_X()
    {
        return x;
    }
    int yuan_Y()
    {
        return y;
    }

    yuan touch(const yuan & R1 , const yuan &R2)
    {
        if (sqrt(abs(pow((R2.x-R1.x),2)-pow((R2.y - R1.y),2))) == abs(R2.r - R1.r))
        {
            cout << "两圆内切" << endl;

        }
        else if (sqrt(abs(pow((R2.x-R1.x),2)-pow((R2.y - R1.y),2))) == abs(R2.r + R1.r))
        {
            cout << "两圆外切" << endl;
        }
        else
        {
            cout << "两圆不相切" << endl;
            cout << "圆心横相距 = " << pow((R2.x-R1.x) , 2)<< endl;
            cout << "圆心纵相距 = " << pow((R2.y-R1.y) , 2)<< endl;
            cout << "圆心相距 = "   << sqrt(abs(pow((R2.x-R1.x),2)-pow((R2.y - R1.y),2)))<< endl;
        }
        return R1;
    }


};

int main(int argc, char const *argv[])
{
    yuan R1;
    R1.set_data();

    yuan R2;
    R2.set_data();

    cout << "圆1周长 = " << R1.yuan_C() << endl;
    cout << "圆1面积 = " << R1.yuan_S() << endl;
    cout << "圆1直径 = " << R1.yuan_D() << endl;
    cout << "圆1圆心 = (" << R1.yuan_X() << "," << R1.yuan_Y() << ")\n" << endl;

    cout << "圆2周长 = " << R2.yuan_C() << endl;
    cout << "圆2面积 = " << R2.yuan_S() << endl;
    cout << "圆2直径 = " << R2.yuan_D() << endl;
    cout << "圆2圆心 = (" << R2.yuan_X() << "," << R2.yuan_Y() << ")\n" << endl;
    
    yuan T;
    T.touch(R1,R2);
    return 0;
}
